var app = getApp();
var httpUtils = require('../../utils/httpUtils.js');

Page({
  data: {
    questionList: []
  },
  onLoad: function() {
    var _this = this;
    var url = app.globalData.interfaceUrl + '/common.do?method=getByAdByType';
    var bizParams = {};
    bizParams.type = '16'
    httpUtils.post(url, bizParams, function(res) {
      var questionList = res.data.data;
      _this.setData({
        questionList: questionList
      });
      console.log(questionList);
    }, function(res) {
      console.log(JSON.stringify(res));
    });

  },
  gotoAnswerQA: function(e) {
    var adId = e.currentTarget.dataset.ad_id;
    wx.navigateTo({
      url: '../answerQA/answerQA?adId=' + adId
    })
  }
})